#ifndef TCPSTATUSWIDGET_H
#define TCPSTATUSWIDGET_H

#include <QWidget>
#include <QJsonObject>
#include <QVBoxLayout>
#include <QMap>
#include <QLineEdit>
#include"jointstatuswidget.h"

class TcpStatusWidget : public QWidget {
    Q_OBJECT

public:
    //static TcpStatusWidget* instance();
    //explicit TcpStatusWidget(const QJsonObject& TcpToolPosition = QJsonObject(), QWidget* parent = nullptr);
    explicit TcpStatusWidget(const QJsonObject& TcpToolPosition, QWidget* parent = nullptr);
    void updateTcp(const QString& label, const QString& value);

public slots:
    void tcpStatusCallBack();
private:
    void createTcpControl(const QString& key, const QString& value, QVBoxLayout* layout);
    QMap<QString, QLineEdit*> valueLineEdits;
    std::vector<QString> TcpList;


    std::vector<double> endPoseValue;
};

#endif // TCPSTATUSWIDGET_H
